<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>bpmn-visualization - Demo</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.7.2/css/all.min.css" integrity="sha256-dABdfBfUoC8vJUBOwGVdm8L9qlMWaHTIfXt+7GnZCIo=" crossorigin="anonymous">
    <link href="./static/css/styles.css" rel="stylesheet">
    <link rel="icon" type="image/svg+xml" href="./static/img/favicon.svg">
    <script src="../ts/pages/index.ts" type="module"></script>
</head>
<body class="bg-gray-800 font-sans leading-normal tracking-normal flex flex-col h-screen">
    <!--Nav-->
    <nav class="bg-gray-800 pt-2 md:pt-1 pb-1 px-1 mt-0 h-auto w-full">
      <div class="flex flex-wrap items-center">
        <div class="flex flex-shrink justify-center md:justify-start text-white">
          <a class="flex items-center mb-1 md:mt-2 md:mb-2" href="../../examples/index.html">
            <img src="static/img/logo_white.svg" alt="logo" class="h-11 ml-3 mr-2">
            <span class="h-11 ml-2 py-1 text-2xl md:text-3xl">bpmn-visualization</span>
          </a>
        </div>
      </div>
    </nav>
    <!-- Page section -->
    <div class="flex flex-col md:flex-row flex-grow">
      <!-- Control Panel -->
      <div class="bg-gray-800 shadow-xl w-full md:w-48">
        <ul class="flex flex-row md:flex-col py-0 px-1 md:px-2 md:mr-3">
            <li>
              <div class="select-none pt-1 pb-0.5 md:pb-5 md:pt-0 pl-1 border-b-2 border-gray-800">
                <div class="bg-gradient-to-b from-red-200 to-red-100 border-b-4 border-red-600 rounded-lg shadow-xl hover:border-red-900">
                  <div class="cursor-pointer text-red-500 hover:text-red-900">
                    <div class="text-center">
                      <input type="file" id="bpmn-file" name="file" class="hidden"/>
                      <label for="bpmn-file" class="font-bold text-1xl md:text-3xl cursor-pointer"><span><em class="fas fa-file"></em>BPMN<em class="fas fa-upload"></em></span></label>
                    </div>
                  </div>
                </div>
              </div>
              <div class="block pb-1 md:py-3 pl-1 text-white no-underline md:border-b-2 md:border-purple-500">
                <label for="fitOnLoad">Fit on load:
                  <input type="checkbox" id="fitOnLoad" name="fitOnLoad" checked>
                </label>
              </div>
            </li>
            <li class="flex-1">
              <div class="py-1 md:py-3 pl-1 text-white md:border-b-2 md:border-red-500">
                <div class="block no-underline md:pb-3 md:border-b-2 md:border-blue-600">
                  <label class="flex justify-evenly md:block">Fit type:
                    <select name="fitTypes" id="fitType-selected" class="w-1/2 md:w-full pl-1 md:pl-0 text-blue-900">
                      <option value="None">None</option>
                      <option value="HorizontalVertical">Horizontal-Vertical</option>
                      <option value="Horizontal">Horizontal</option>
                      <option value="Vertical">Vertical</option>
                      <option value="Center" selected>Center</option>
                    </select>
                  </label>
                </div>
                <div class="block no-underline mt-2 md:mt-3">
                  <label for="fit-margin" class="flex justify-around">Fit margin:
                    <input type="number" id="fit-margin" class="w-1/3 pl-1 text-red-900 md:ml-auto" min="0" max="100" value="50" maxlength="3" oninput="validity.valid||(value='');">
                  </label>
                </div>
              </div>
            </li>
            <li class="flex-1">
              <div class="py-1 md:py-3 pl-1 text-white md:border-b-2 md:border-yellow-500">
                <div id="zoom" class="flex md:justify-between">
                  <span>Zoom:</span>
                  <span class="ml-4 md:ml-0">
                    <button id="zoom-in" title="Zoom In"><em class="fa-solid fa-magnifying-glass-plus"></em></button>
                    <button id="zoom-out" title="Zoom Out"><em class="ml-2 fa-solid fa-magnifying-glass-minus"></em></button>
                    <button id="zoom-reset" title="Zoom Reset"><em class="ml-2 md:ml-4 fa-solid fa-magnifying-glass"></em></button>
                  </span>
                </div>
              </div>
              <div class="py-1 md:py-3 pl-1 text-white md:border-b-2 md:border-b-fuchsia-400">
                <label class="flex md:block">Theme:
                  <select name="themes" id="theme-selected" class="w-1/2 md:w-full pl-1 md:pl-0 ml-2 md:ml-0 text-blue-900">
                    <option value="default" selected>Default</option>
                    <option value="dark">Dark</option>
                    <option value="brown">Brown</option>
                    <option value="light-blue">Light Blue</option>
                  </select>
                </label>
              </div>
            </li>
          </ul>
      </div>

      <!-- Main section -->
      <div class="flex flex-1 flex-col bg-gray-100 md:rounded-tl-2xl md:rounded-bl-2xl mt-2 md:mt-0">
        <div class="flex-grow mt-2 p-6 flex flex-col">
          <!-- BPMN container space -->
          <!-- relative position is required by bpmn-container and the generated drop-container element to make its absolute position work -->
          <div class="flex-grow bg-white border-transparent rounded-lg shadow-xl relative">
            <!-- set absolute and no inset, as mxGraph needs absolute dimension to make the fit work and to fit the whole parent container -->
            <div id="bpmn-container" class="overflow-hidden absolute inset-0">
            </div>
          </div>
          <!-- /BPMN container Space -->
        </div>

      </div>
    </div>

    <footer class="flex flex-col-reverse items-end">
      <div id="footer-content" class="py-3 mr-3 text-white"></div>
    </footer>
</body>
</html>
